/*
 * @Author: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @Date: 2023-10-20 20:25:35
 * @LastEditors: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @LastEditTime: 2023-10-23 09:04:57
 * @FilePath: \uni-preset-vue-vite-ts\src\modules\passenger.ts
 * @Description: 
 * qq1908552310
 */
import { defineStore } from 'pinia';
export const usePagStore = defineStore('passenger', {
    state: () => {
        return {
            count: [],
            addMessage: ""
        };
    },
    // 也可以这样定义
    // state: () => ({ count: 0 })
    actions: {
        async getPsg(data: any) {
            const res = await uniCloud.callFunction({
                name: "passenger",
                data: data
            })
            this.count = res.result.result.data
        },
        async addPsg(data: any) {
            console.log(data, "data")
            const res = await uniCloud.callFunction({
                name: "passenger",
                data: data
            })
            this.addMessage = res.result
        }
    },

});